package com.entity;

import java.io.Serializable;

/**
 * @author 
 */
public class Goods implements Serializable {
    private String gid;

    private String gtid;

    private String shid;

    private String adid;

    private String gname;

    private Integer gprice;

    private String gdesc;

    private String gcomment;

    private Integer gstate;

    private Integer gnum;

    private Integer goldprice;

    private String gimg;

    private Shop shop;

    public Shop getShop() {
        return shop;
    }

    public void setShop(Shop shop) {
        this.shop = shop;
    }

    private static final long serialVersionUID = 1L;

    public String getGid() {
        return gid;
    }

    public void setGid(String gid) {
        this.gid = gid;
    }

    public String getGtid() {
        return gtid;
    }

    public void setGtid(String gtid) {
        this.gtid = gtid;
    }

    public String getShid() {
        return shid;
    }

    public void setShid(String shid) {
        this.shid = shid;
    }

    public String getAdid() {
        return adid;
    }

    public void setAdid(String adid) {
        this.adid = adid;
    }

    public String getGname() {
        return gname;
    }

    public void setGname(String gname) {
        this.gname = gname;
    }

    public Integer getGprice() {
        return gprice;
    }

    public void setGprice(Integer gprice) {
        this.gprice = gprice;
    }

    public String getGdesc() {
        return gdesc;
    }

    public void setGdesc(String gdesc) {
        this.gdesc = gdesc;
    }

    public String getGcomment() {
        return gcomment;
    }

    public void setGcomment(String gcomment) {
        this.gcomment = gcomment;
    }

    public Integer getGstate() {
        return gstate;
    }

    public void setGstate(Integer gstate) {
        this.gstate = gstate;
    }

    public Integer getGnum() {
        return gnum;
    }

    public void setGnum(Integer gnum) {
        this.gnum = gnum;
    }

    public Integer getGoldprice() {
        return goldprice;
    }

    public void setGoldprice(Integer goldprice) {
        this.goldprice = goldprice;
    }

    public String getGimg() {
        return gimg;
    }

    public void setGimg(String gimg) {
        this.gimg = gimg;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Goods other = (Goods) that;
        return (this.getGid() == null ? other.getGid() == null : this.getGid().equals(other.getGid()))
            && (this.getGtid() == null ? other.getGtid() == null : this.getGtid().equals(other.getGtid()))
            && (this.getShid() == null ? other.getShid() == null : this.getShid().equals(other.getShid()))
            && (this.getAdid() == null ? other.getAdid() == null : this.getAdid().equals(other.getAdid()))
            && (this.getGname() == null ? other.getGname() == null : this.getGname().equals(other.getGname()))
            && (this.getGprice() == null ? other.getGprice() == null : this.getGprice().equals(other.getGprice()))
            && (this.getGdesc() == null ? other.getGdesc() == null : this.getGdesc().equals(other.getGdesc()))
            && (this.getGcomment() == null ? other.getGcomment() == null : this.getGcomment().equals(other.getGcomment()))
            && (this.getGstate() == null ? other.getGstate() == null : this.getGstate().equals(other.getGstate()))
            && (this.getGnum() == null ? other.getGnum() == null : this.getGnum().equals(other.getGnum()))
            && (this.getGoldprice() == null ? other.getGoldprice() == null : this.getGoldprice().equals(other.getGoldprice()))
            && (this.getGimg() == null ? other.getGimg() == null : this.getGimg().equals(other.getGimg()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGid() == null) ? 0 : getGid().hashCode());
        result = prime * result + ((getGtid() == null) ? 0 : getGtid().hashCode());
        result = prime * result + ((getShid() == null) ? 0 : getShid().hashCode());
        result = prime * result + ((getAdid() == null) ? 0 : getAdid().hashCode());
        result = prime * result + ((getGname() == null) ? 0 : getGname().hashCode());
        result = prime * result + ((getGprice() == null) ? 0 : getGprice().hashCode());
        result = prime * result + ((getGdesc() == null) ? 0 : getGdesc().hashCode());
        result = prime * result + ((getGcomment() == null) ? 0 : getGcomment().hashCode());
        result = prime * result + ((getGstate() == null) ? 0 : getGstate().hashCode());
        result = prime * result + ((getGnum() == null) ? 0 : getGnum().hashCode());
        result = prime * result + ((getGoldprice() == null) ? 0 : getGoldprice().hashCode());
        result = prime * result + ((getGimg() == null) ? 0 : getGimg().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", gid=").append(gid);
        sb.append(", gtid=").append(gtid);
        sb.append(", shid=").append(shid);
        sb.append(", adid=").append(adid);
        sb.append(", gname=").append(gname);
        sb.append(", gprice=").append(gprice);
        sb.append(", gdesc=").append(gdesc);
        sb.append(", gcomment=").append(gcomment);
        sb.append(", gstate=").append(gstate);
        sb.append(", gnum=").append(gnum);
        sb.append(", goldprice=").append(goldprice);
        sb.append(", gimg=").append(gimg);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}